package jym.tan.movielibrary.component.ui.table.model;

import java.util.List;

import javax.swing.table.AbstractTableModel;

import jym.tan.movielibrary.model.LibraryModel;

public class LibraryTableModel extends AbstractTableModel {
	
	private static final long serialVersionUID = 26L;
	
	private List<LibraryModel> models;
	
	public int getRowCount() {
		return models.size();
	}

	public int getColumnCount() {
		return 10;
	}

	public Object getValueAt(int rowIndex, int columnIndex) {
		return models.get(rowIndex).getFirstName();
	}

	public List<LibraryModel> getModels() {
		return models;
	}

	public void setModels(List<LibraryModel> models) {
		this.models = models;
	}
}
